﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication2
{
    public partial class WebForm2 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (PreviousPage != null)
            {
                TextBox tb1 = (TextBox)PreviousPage.FindControl("TextBox1");
                TextBox tb2 = (TextBox)PreviousPage.FindControl("TextBox2");
                TextBox tb3 = (TextBox)PreviousPage.FindControl("TextBox3");

                //if (tb1.Text == "请输入内容" & tb2.Text== "请输入内容" & tb3.Text== "请输入内容")
                //{
                //    Label1.Text = "请填写完整！";
                //}
                if (tb1.Text == "请输入内容" | tb2.Text == "请输入内容" | tb3.Text == "请输入内容")
                {
                    Label1.Text = "请填写完整！";
                }
                else if(tb1.Text != "" & tb2.Text != "" & tb3.Text != "") 
                {
                    Label1.Text = "请确认你填写的信息：";
                    Label2.Text = "姓名:" + tb1.Text;
                    Label3.Text = "年龄:" + tb2.Text;
                    Label4.Text = "爱好:" + tb3.Text;
                }
                else
                {
                    Label1.Text = "请填写完整！";
                }
            }
        }
    }
}